home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / ImageCodec.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  9.3 KB  |  311 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ImageCodec.a
  3. ;
  4. ;    Contains:    QuickTime Interfaces.
  5. ;
  6. ;    Version:    Technology:    QuickTime 2.0
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__IMAGECODEC__') = 'UNDEFINED' THEN
  21. __IMAGECODEC__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'MixedMode.a'                                        ;
  33. ;        include 'QuickdrawText.a'                                    ;
  34.  
  35.     IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
  36.     include 'QDOffscreen.a'
  37.     ENDIF
  38. ;        include 'Errors.a'                                            ;
  39.  
  40.     IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
  41.     include 'Windows.a'
  42.     ENDIF
  43. ;        include 'Memory.a'                                            ;
  44. ;        include 'Events.a'                                            ;
  45. ;            include 'OSUtils.a'                                    ;
  46. ;        include 'Controls.a'                                        ;
  47. ;            include 'Menus.a'                                        ;
  48.  
  49.     IF &TYPE('__IMAGECOMPRESSION__') = 'UNDEFINED' THEN
  50.     include 'ImageCompression.a'
  51.     ENDIF
  52. ;        include 'Components.a'                                        ;
  53. ;        include 'StandardFile.a'                                    ;
  54. ;            include 'Dialogs.a'                                    ;
  55. ;                include 'TextEdit.a'                                ;
  56. ;            include 'Files.a'                                        ;
  57.  
  58.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  59.     include 'Components.a'
  60.     ENDIF
  61.  
  62.     IF &TYPE('__MOVIES__') = 'UNDEFINED' THEN
  63.     include 'Movies.a'
  64.     ENDIF
  65. ;        include 'Aliases.a'                                        ;
  66. ;            include 'AppleTalk.a'                                    ;
  67.  
  68. codecGetCodecInfo                EQU        $00
  69. codecGetCompressionTime            EQU        $01
  70. codecGetMaxCompressionSize        EQU        $02
  71. codecPreCompress                EQU        $03
  72. codecBandCompress                EQU        $04
  73. codecPreDecompress                EQU        $05
  74. codecBandDecompress                EQU        $06
  75. codecCDSequenceBusy                EQU        $07
  76. codecGetCompressedImageSize        EQU        $08
  77. codecGetSimilarity                EQU        $09
  78. codecTrimImage                    EQU        $0A
  79. codecRequestSettings            EQU        $0B
  80. codecGetSettings                EQU        $0C
  81. codecSetSettings                EQU        $0D
  82. codecCDSequenceFlush            EQU        $0E
  83. codecSetTimeCode                EQU        $0F
  84.  
  85. codecCanScale                    EQU        1 << 0
  86. codecCanMask                    EQU        1 << 1
  87. codecCanMatte                    EQU        1 << 2
  88. codecCanTransform                EQU        1 << 3
  89. codecCanTransferMode            EQU        1 << 4
  90. codecCanCopyPrev                EQU        1 << 5
  91. codecCanSpool                    EQU        1 << 6
  92. codecCanClipVertical            EQU        1 << 7
  93. codecCanClipRectangular            EQU        1 << 8
  94. codecCanRemapColor                EQU        1 << 9
  95. codecCanFastDither                EQU        1 << 10
  96. codecCanSrcExtract                EQU        1 << 11
  97. codecCanCopyPrevComp            EQU        1 << 12
  98. codecCanAsync                    EQU        1 << 13
  99. codecCanMakeMask                EQU        1 << 14
  100. codecCanShift                    EQU        1 << 15
  101. codecCanAsyncWhen                EQU        1 << 16
  102. codecCanShieldCursor            EQU        1 << 17
  103. codecCanManagePrevBuffer        EQU        1 << 18
  104.  
  105. CodecCapabilities         RECORD    0
  106. flags                     ds.l   1        ; offset: $0 (0)
  107. wantedPixelSize             ds.w   1        ; offset: $4 (4)
  108. extendWidth                 ds.w   1        ; offset: $6 (6)
  109. extendHeight             ds.w   1        ; offset: $8 (8)
  110. bandMin                     ds.w   1        ; offset: $A (10)
  111. bandInc                     ds.w   1        ; offset: $C (12)
  112. pad                         ds.w   1        ; offset: $E (14)
  113. time                     ds.l   1        ; offset: $10 (16)
  114. sizeof                     EQU *            ; size:   $14 (20)
  115.                         ENDR
  116.  
  117. ; typedef struct CodecCapabilities  CodecCapabilities
  118.  
  119. codecConditionFirstBand            EQU        1 << 0
  120. codecConditionLastBand            EQU        1 << 1
  121. codecConditionFirstFrame        EQU        1 << 2
  122. codecConditionNewDepth            EQU        1 << 3
  123. codecConditionNewTransform        EQU        1 << 4
  124. codecConditionNewSrcRect        EQU        1 << 5
  125. codecConditionNewMask            EQU        1 << 6
  126. codecConditionNewMatte            EQU        1 << 7
  127. codecConditionNewTransferMode    EQU        1 << 8
  128. codecConditionNewClut            EQU        1 << 9
  129. codecConditionNewAccuracy        EQU        1 << 10
  130. codecConditionNewDestination    EQU        1 << 11
  131. codecConditionFirstScreen        EQU        1 << 12
  132. codecConditionDoCursor            EQU        1 << 13
  133. codecConditionCatchUpDiff        EQU        1 << 14
  134. codecConditionCodecChangedMask    EQU        1 << 31
  135.  
  136. codecInfoResourceType            EQU        'cdci'
  137. codecInterfaceVersion            EQU        2
  138.  
  139. CodecCompressParams     RECORD    0
  140. sequenceID                 ds.l   1        ; offset: $0 (0)
  141. imageDescription         ds.l   1        ; offset: $4 (4)
  142. data                     ds.l   1        ; offset: $8 (8)
  143. bufferSize                 ds.l   1        ; offset: $C (12)
  144. frameNumber                 ds.l   1        ; offset: $10 (16)
  145. startLine                 ds.l   1        ; offset: $14 (20)
  146. stopLine                 ds.l   1        ; offset: $18 (24)
  147. conditionFlags             ds.l   1        ; offset: $1C (28)
  148. callerFlags                 ds.w   1        ; offset: $20 (32)
  149. capabilities             ds.l   1        ; offset: $22 (34)
  150. progressProcRecord         ds     ICMProgressProcRecord ; offset: $26 (38)
  151. completionProcRecord     ds     ICMCompletionProcRecord ; offset: $2E (46)
  152. flushProcRecord             ds     ICMFlushProcRecord ; offset: $36 (54)
  153. srcPixMap                 ds     PixMap    ; offset: $3E (62)
  154. prevPixMap                 ds     PixMap    ; offset: $70 (112)
  155. spatialQuality             ds.l   1        ; offset: $A2 (162)
  156. temporalQuality             ds.l   1        ; offset: $A6 (166)
  157. similarity                 ds.l   1        ; offset: $AA (170)
  158. dataRateParams             ds.l   1        ; offset: $AE (174)
  159. reserved                 ds.l   1        ; offset: $B2 (178)
  160. sizeof                     EQU *            ; size:   $B6 (182)
  161.                         ENDR
  162.  
  163. ; typedef struct CodecCompressParams  CodecCompressParams
  164. CodecDecompressParams     RECORD    0
  165. sequenceID                 ds.l   1        ; offset: $0 (0)
  166. imageDescription         ds.l   1        ; offset: $4 (4)
  167. data                     ds.l   1        ; offset: $8 (8)
  168. bufferSize                 ds.l   1        ; offset: $C (12)
  169. frameNumber                 ds.l   1        ; offset: $10 (16)
  170. startLine                 ds.l   1        ; offset: $14 (20)
  171. stopLine                 ds.l   1        ; offset: $18 (24)
  172. conditionFlags             ds.l   1        ; offset: $1C (28)
  173. callerFlags                 ds.w   1        ; offset: $20 (32)
  174. capabilities             ds.l   1        ; offset: $22 (34)
  175. progressProcRecord         ds     ICMProgressProcRecord ; offset: $26 (38)
  176. completionProcRecord     ds     ICMCompletionProcRecord ; offset: $2E (46)
  177. dataProcRecord             ds     ICMDataProcRecord ; offset: $36 (54)
  178. port                     ds.l   1        ; offset: $3E (62)
  179. dstPixMap                 ds     PixMap    ; offset: $42 (66)
  180. maskBits                 ds.l   1        ; offset: $74 (116)
  181. mattePixMap                 ds.l   1        ; offset: $78 (120)
  182. srcRect                     ds     Rect    ; offset: $7C (124)
  183. matrix                     ds.l   1        ; offset: $84 (132)
  184. accuracy                 ds.l   1        ; offset: $88 (136)
  185. transferMode             ds.w   1        ; offset: $8C (140)
  186. frameTime                 ds.l   1        ; offset: $8E (142)
  187. reserved                 ds.l   1        ; offset: $92 (146)
  188. matrixFlags                 ds.b   1        ; offset: $96 (150)
  189. matrixType                 ds.b   1        ; offset: $97 (151)
  190. dstRect                     ds     Rect    ; offset: $98 (152)
  191. sizeof                     EQU *            ; size:   $A0 (160)
  192.                         ENDR
  193.  
  194. ; typedef struct CodecDecompressParams  CodecDecompressParams
  195.  
  196. matrixFlagScale2x                EQU        1 << 7
  197.  
  198. ;
  199. ; pascal ComponentResult CDGetCodecInfo(Handle storage, CodecInfo *info)
  200. ;
  201.     IF GENERATINGCFM THEN
  202.         IMPORT_CFM_FUNCTION    CDGetCodecInfo
  203.     ENDIF
  204.  
  205. ;
  206. ; pascal ComponentResult CDGetCompressionTime(Handle storage, PixMapHandle src, const Rect *srcRect, short depth, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *time)
  207. ;
  208.     IF GENERATINGCFM THEN
  209.         IMPORT_CFM_FUNCTION    CDGetCompressionTime
  210.     ENDIF
  211.  
  212. ;
  213. ; pascal ComponentResult CDGetMaxCompressionSize(Handle storage, PixMapHandle src, const Rect *srcRect, short depth, CodecQ quality, long *size)
  214. ;
  215.     IF GENERATINGCFM THEN
  216.         IMPORT_CFM_FUNCTION    CDGetMaxCompressionSize
  217.     ENDIF
  218.  
  219. ;
  220. ; pascal ComponentResult CDPreCompress(Handle storage, CodecCompressParams *params)
  221. ;
  222.     IF GENERATINGCFM THEN
  223.         IMPORT_CFM_FUNCTION    CDPreCompress
  224.     ENDIF
  225.  
  226. ;
  227. ; pascal ComponentResult CDBandCompress(Handle storage, CodecCompressParams *params)
  228. ;
  229.     IF GENERATINGCFM THEN
  230.         IMPORT_CFM_FUNCTION    CDBandCompress
  231.     ENDIF
  232.  
  233. ;
  234. ; pascal ComponentResult CDPreDecompress(Handle storage, CodecDecompressParams *params)
  235. ;
  236.     IF GENERATINGCFM THEN
  237.         IMPORT_CFM_FUNCTION    CDPreDecompress
  238.     ENDIF
  239.  
  240. ;
  241. ; pascal ComponentResult CDBandDecompress(Handle storage, CodecDecompressParams *params)
  242. ;
  243.     IF GENERATINGCFM THEN
  244.         IMPORT_CFM_FUNCTION    CDBandDecompress
  245.     ENDIF
  246.  
  247. ;
  248. ; pascal ComponentResult CDCodecBusy(Handle storage, ImageSequence seq)
  249. ;
  250.     IF GENERATINGCFM THEN
  251.         IMPORT_CFM_FUNCTION    CDCodecBusy
  252.     ENDIF
  253.  
  254. ;
  255. ; pascal ComponentResult CDGetCompressedImageSize(Handle storage, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize)
  256. ;
  257.     IF GENERATINGCFM THEN
  258.         IMPORT_CFM_FUNCTION    CDGetCompressedImageSize
  259.     ENDIF
  260.  
  261. ;
  262. ; pascal ComponentResult CDGetSimilarity(Handle storage, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity)
  263. ;
  264.     IF GENERATINGCFM THEN
  265.         IMPORT_CFM_FUNCTION    CDGetSimilarity
  266.     ENDIF
  267.  
  268. ;
  269. ; pascal ComponentResult CDTrimImage(Handle storage, ImageDescriptionHandle Desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc)
  270. ;
  271.     IF GENERATINGCFM THEN
  272.         IMPORT_CFM_FUNCTION    CDTrimImage
  273.     ENDIF
  274.  
  275. ;
  276. ; pascal ComponentResult CDRequestSettings(Handle storage, Handle settings, Rect *rp, ModalFilterUPP filterProc)
  277. ;
  278.     IF GENERATINGCFM THEN
  279.         IMPORT_CFM_FUNCTION    CDRequestSettings
  280.     ENDIF
  281.  
  282. ;
  283. ; pascal ComponentResult CDGetSettings(Handle storage, Handle settings)
  284. ;
  285.     IF GENERATINGCFM THEN
  286.         IMPORT_CFM_FUNCTION    CDGetSettings
  287.     ENDIF
  288.  
  289. ;
  290. ; pascal ComponentResult CDSetSettings(Handle storage, Handle settings)
  291. ;
  292.     IF GENERATINGCFM THEN
  293.         IMPORT_CFM_FUNCTION    CDSetSettings
  294.     ENDIF
  295.  
  296. ;
  297. ; pascal ComponentResult CDCodecFlush(Handle storage)
  298. ;
  299.     IF GENERATINGCFM THEN
  300.         IMPORT_CFM_FUNCTION    CDCodecFlush
  301.     ENDIF
  302.  
  303. ;
  304. ; pascal ComponentResult CDCodecSetTimeCode(Handle storage, void *timeCodeFormat, void *timeCodeTime)
  305. ;
  306.     IF GENERATINGCFM THEN
  307.         IMPORT_CFM_FUNCTION    CDCodecSetTimeCode
  308.     ENDIF
  309.  
  310.     ENDIF ; __IMAGECODEC__
  311.